<template>
	<view class="container">
		<view class="subsidynav">
			<view class="item" :class="{ active: isShow == 0 }" @click="handler1">店铺补贴劵</view>
			<view class="item" :class="{ active: isShow == 1 }" @click="handler2">商品补贴</view>
		</view>

		<shop v-show="isShow == 1"></shop>	
	<merchandise v-show="isShow == 0"></merchandise>
	</view>
</template>

<script>
import shop from '../../components/merchandise/merchandise.vue';
import merchandise from '../../components/shop/shop.vue';
export default {
	data() {
		return {
			isShow: 0
		};
	},
	methods: {
		handler1() {
			this.isShow = 0;
		},
		handler2() {
			this.isShow = 1;
		}
	},
	components: {
		shop,
		merchandise
	}
};
</script>

<style lang="stylus">
.container
	.subsidynav
		width 100%
		height 80upx
		display flex
		justify-content space-between
		flex-grow 1
		line-height 80upx
		text-align center
		.active
			border-bottom 2upx solid #007AFF
		.item
			flex-grow 1
</style>
